package com.hspedu.collection_;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/2/6
 * @time 15:10
 */
public class Collection_ {
    public static void main(String[] args) {
        List list = new ArrayList();
        list.add(1);
        list.add(2);
        list.add(3);
        list.add(0);

        list.remove((Integer) 0);
        list.add(1);
        list.add(1);
        list.add(2);
        System.out.println("list = " + list);
        ArrayList arrayList = new ArrayList();
        arrayList.add(1);
        arrayList.add(2);
        list.removeAll(arrayList);
        System.out.println("list = " + list);
    }
}
